import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;


public class GUIDGen {
	
	private static int MAX_GUIDS = 100;

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		UIDGenerator guidgen =  UIDGenerator.getInstance();
		
		BufferedWriter out = new BufferedWriter(new FileWriter("guid.txt"));
		
		for (int i=0; i < MAX_GUIDS; i++) {
			
			String key = guidgen.getKey();
			
			System.out.println("Dumping: " + key);
			out.write(guidgen.getKey() + "\r\n");
		}
		
		out.close();
	}

}
